﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Multy_Inheritance
{
    public class BaseClassMultyInheritance
    {
        first frist1 = new first();
        Isecond se1 = new second();
        public void firstmethod()
        {
            frist1.firstmethod();
        }
        public void secondmethod()
        {
            se1.secondmethod();
        }
    }
    class first
    {

        public first()
        {
        }
        public void firstmethod()
        {
            Console.WriteLine("The first method is called ");
        }
    }
    interface Isecond
    {
        void secondmethod();
    }
   
    class second :Isecond
    {
        public second()
        {
        }
        public void secondmethod()
        {
            Console.WriteLine("The second method is called ");
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            BaseClassMultyInheritance obj = new BaseClassMultyInheritance();
            obj.firstmethod();
            obj.secondmethod();
            Console.ReadKey();
        }
    }
}
